package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreAccessoriesSummaryMapper;
import com.ruoyi.system.domain.StoreAccessoriesSummary;
import com.ruoyi.system.service.IStoreAccessoriesSummaryService;

/**
 * 门店配品汇总 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-27
 */
@Service
public class StoreAccessoriesSummaryServiceImpl implements IStoreAccessoriesSummaryService
{
    @Autowired
    private StoreAccessoriesSummaryMapper storeAccessoriesSummaryMapper;

    /**
     * 通过id查询门店配品汇总信息
     *
     * @param id 门店配品汇总信息主键
     * @return 门店配品汇总信息
     */
    @Override
    public StoreAccessoriesSummary selectStoreAccessoriesSummaryById(Long id)
    {
        return storeAccessoriesSummaryMapper.selectStoreAccessoriesSummaryById(id);
    }

    /**
     * 通过门店名称查询门店配品汇总信息列表
     *
     * @param storeName 门店名称
     * @return 门店配品汇总信息
     */
    @Override
    public List<StoreAccessoriesSummary> selectStoreAccessoriesSummaryListByName(String storeName)
    {
        return storeAccessoriesSummaryMapper.selectStoreAccessoriesSummaryListByName(storeName);
    }

    /**
     * 新增门店配品汇总信息
     *
     * @param storeAccessoriesSummary 门店配品汇总信息
     * @return 结果
     */
    @Override
    public int insertStoreAccessoriesSummary(StoreAccessoriesSummary storeAccessoriesSummary)
    {
        return storeAccessoriesSummaryMapper.insertStoreAccessoriesSummary(storeAccessoriesSummary);
    }

    /**
     * 修改门店配品汇总信息
     *
     * @param storeAccessoriesSummary 门店配品汇总信息
     * @return 结果
     */
    @Override
    public int updateStoreAccessoriesSummary(StoreAccessoriesSummary storeAccessoriesSummary)
    {
        return storeAccessoriesSummaryMapper.updateStoreAccessoriesSummary(storeAccessoriesSummary);
    }

    /**
     * 通过id批量删除门店配品汇总信息
     *
     * @param ids 需要删除的门店配品汇总主键
     * @return 结果
     */
    @Override
    public int deleteStoreAccessoriesSummaryByIds(Long[] ids)
    {
        return storeAccessoriesSummaryMapper.deleteStoreAccessoriesSummaryByIds(ids);
    }

    /**
     * 通过id删除门店配品汇总信息
     *
     * @param id 门店配品汇总信息主键
     * @return 结果
     */
    @Override
    public int deleteStoreAccessoriesSummaryById(Long id)
    {
        return storeAccessoriesSummaryMapper.deleteStoreAccessoriesSummaryById(id);
    }
}
